package com.fulihui.weixinclient.request.order;

import com.fulihui.weixinclient.http.HttpMethodEnum;
import com.fulihui.weixinclient.result.order.RefundQueryWeixinResult;
import com.fulihui.weixinclient.util.XMLUtil;

/**
 * 微信退款查询接口请求参数
 * Created by Willard on 2015/9/18.
 */
public class RefundQueryWeixinRequest extends OrderWeixinRequest<RefundQueryWeixinResult> {
    private static final long serialVersionUID = -6685527174373561625L;

    /* 微信订单号 四选一 */
    private String            transaction_id;

    /* 商户订单号 四选一 */
    private String            out_trade_no;

    /* 商户退款单号 四选一 */
    private String            out_refund_no;

    /* 微信退款单号 四选一 */
    private String            refund_id;

    @Override
    protected void childParam() {
    }

    @Override
    public String service() {
        return "https://api.mch.weixin.qq.com/pay/refundquery";
    }

    @Override
    public String urlEndStr() {
        return null;
    }

    @Override
    public RefundQueryWeixinResult parseResult(String respStr) {
        return XMLUtil.parseObject(respStr, RefundQueryWeixinResult.class);
    }

    @Override
    public HttpMethodEnum httpMethod() {
        return HttpMethodEnum.SSL_POST;
    }

    @Override
    public String requestData() {
        return XMLUtil.toXMLString(this);
    }

    public String getTransaction_id() {
        return transaction_id;
    }

    public void setTransaction_id(String transaction_id) {
        this.transaction_id = transaction_id;
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }

    public String getOut_refund_no() {
        return out_refund_no;
    }

    public void setOut_refund_no(String out_refund_no) {
        this.out_refund_no = out_refund_no;
    }

    public String getRefund_id() {
        return refund_id;
    }

    public void setRefund_id(String refund_id) {
        this.refund_id = refund_id;
    }
}
